import Attendance from "../pages/Home/Attendance"
import Mine from "../pages/Home/Mine"
import Statistics from "../pages/Home/Statistics"
import Users from "../pages/Home/Users"
import Welcome from "../pages/Home/Welcome"
import StudentManager from "../pages/Home/StudentManager"
import studentProduct from "../pages/Home/StudentManager/studentProduct.vue"
import studentDormitory from "../pages/Home/StudentManager/studentDormitory.vue"
import studentProfile from "../pages/Home/StudentManager/studentProfile.vue"


const allRoutes = [
    {
        path:"Welcome",
        name:"Welcome",
        component:Welcome,
        //meta属性用来储存一些信息
        meta:{
            icon:"iconfont icon-guanli",
            name:"管理首页",
            fullPath:"/Welcome"
        }
    },
    {
        path:"Attendance",
        name:"Attendance",
        component:Attendance,
        //meta属性用来储存一些信息，这里的信息不是随便定义的，必须和后台返回的信息一致才能进行比对
        meta:{
            icon:"iconfont icon-kaoqin",
            name:"考勤管理",
            fullPath:"/Attendance"
        }
    },
    {
        path:"Users",
        name:"Users",
        component:Users,
        //meta属性用来储存一些信息
        meta:{
            icon:"iconfont icon-yonghuguanli",
            name:"用户管理",
            fullPath:"/Users"
        }
    },

    {
        path:"Mine",
        name:"Mine",
        component:Mine,
        //meta属性用来储存一些信息
        meta:{
            icon:"iconfont icon-wodezhongxin",
            name:"我的中心",
            fullPath:"/Mine"
        }
    },
    {
        path:"Statistics",
        name:"Statistics",
        component:Statistics,
        //meta属性用来储存一些信息
        meta:{
            icon:"iconfont icon-shujutongji",
            name:"数据统计",
            fullPath:"/Statistics"
        }
    },
    {
        path:"StudentManager",
        name:"StudentManager",
        component:StudentManager,
        redirect: "/StudentManager/studentProduct",  //路由重定向
        //meta属性用来储存一些信息
        meta:{
            icon:"iconfont icon-xueyuanguanli",
            name:"学员管理",
            //此属性可以直接赋值给<menu-item>的index属性，省去不必要麻烦
            fullPath:"/StudentManager"
        },
        children:[
            
            {
                path:"studentProfile",
                name:"studentProfile",
                component:studentProfile,
                //meta属性用来储存一些信息
                meta:{
                    icon:"iconfont icon-ziliao",
                    name:"学员资料",
                    fullPath:"/StudentManager/studentProfile"
                }
            },
            {
                path:"studentDormitory",
                name:"studentDormitory",
                component:studentDormitory,
                //meta属性用来储存一些信息
                meta:{
                    icon:"iconfont icon-sushe",
                    name:"学员宿舍",
                    fullPath:"/StudentManager/studentDormitory"
                }
            },
            {
                path:"studentProduct",
                name:"studentProduct",
                component:studentProduct,
                //meta属性用来储存一些信息
                meta:{
                    icon:"iconfont icon-xiangmu",
                    name:"学员项目管理",
                    fullPath:"/StudentManager/studentProduct"
                }
            },
        ]
    },
]

export default allRoutes